<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{if $_GET['type']}{$ret['name']}_{/if}礼物攻略_{obj('base/Base')->SET('giftseo','gl_title')}</title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<link rel="stylesheet" href="{__PUBLIC__}h5/wui/style/weui.css"/>
<link rel="stylesheet" href="{__PUBLIC__}h5/wui/style/weui2.css"/>
<link rel="stylesheet" href="{__PUBLIC__}h5/wui/style/weui3.css"/>
<link rel="stylesheet" href="{__PUBLIC__}h5/swiper/dist/css/swiper.min.css">
<link href="{__PUBLIC__}h5/css/index.css?v=<?=time()?>" rel="stylesheet" type="text/css">
<script src="{__PUBLIC__}h5/wui/zepto.min.js"></script>
<link rel="stylesheet" href="{__PUBLIC__}h5//more/dist/dropload.css?time=<?=time()?>"/>

</head>
<style>
body{background:#fff}
.dropload-down{clear:both}
</style>
<body>
<div class="weui_btn_warn weui-header " style="background:#f84e4e"> 
  <div class="weui-header-left" onClick="javascript :history.back(-1);"> <a class="icon icon-109 f-white dhicon"></a>  </div>
   <h1 class="weui-header-title">礼物攻略</h1>
    <div class="weui-header-right"><a class="icon icon-3 f-white dhicon" onClick="toshare()"></a></div> 
    </div>
     <div class="weui_tab " style="height:44px;" id="tab1"><!--tab-fixed添加顶部-->
            <div class="weui_navbar" style="height:44px;">
                <div class="weui_navbar_item tab-green " data="zh">
                   综合
                </div>
                <div class="weui_navbar_item" data="sendwho">
                    送给谁
                </div>
                <div class="weui_navbar_item" data="whysend">
                    为啥送
                </div>
                 <div class="weui_navbar_item" data="jieri">
                    节日
                </div>
                
            </div>
        </div>
        
        <div class="nav-menu-box sendwho">
          <div class="nav-menu">
          <!---->
          <dt style="padding-left:8px; font-size:14px; color:#666; height:40px; line-height:40px;">送给谁</dt>
         <div class="weui_grids grids-small">
            {foreach obj("index/global","controller")->getgllist('plug_gift_gonglue_send','y')  as $vo}
           <a href="{url($route='index/h5/strategy/id=<id>/type=<type>', $params=array('id'=>$vo['id'],'type'=>'send'))}"> <div class="grid">
                <p class="weui_grid_label">
                    {$vo['name']}
                </p>
            </div></a>
            {/foreach}
           
        </div>
          <!---->
          </div>
        </div>
        
        
        <div class="nav-menu-box whysend">
          <div class="nav-menu">
          <!---->
          <dt style="padding-left:8px; font-size:14px; color:#666; height:40px; line-height:40px;">为啥送</dt>
         <div class="weui_grids grids-small">
            {foreach obj("index/global","controller")->getgllist('plug_gift_gonglue_whysend','y')  as $vo}
           <a href="{url($route='index/h5/strategy/id=<id>/type=<type>', $params=array('id'=>$vo['id'],'type'=>'whysend'))}"> <div class="grid">
                <p class="weui_grid_label">
                    {$vo['name']}
                </p>
            </div></a>
            {/foreach}
           
        </div>
          <!---->
          </div>
        </div>
        
         <div class="nav-menu-box jieri">
          <div class="nav-menu jieri">
          <!---->
          <dt style="padding-left:8px; font-size:14px; color:#666; height:40px; line-height:40px;">节日</dt>
         <div class="weui_grids grids-small">
            {foreach obj("index/global","controller")->getgllist('plug_gift_gonglue_sendtime','y')  as $vo}
           <a href="{url($route='index/h5/strategy/id=<id>/type=<type>', $params=array('id'=>$vo['id'],'type'=>'sendtime'))}"> <div class="grid">
                <p class="weui_grid_label">
                    {$vo['name']}
                </p>
            </div></a>
            {/foreach}
           
        </div>
          <!---->
          </div>
        </div>



     <div  class="mobie-ui">
     
      <div class="itemslist gongluelist content" style="width:95%">
       <div class="lists"></div>
    
  
  
  </div>
  </div>
  
  </div>
  
  
  
  
  {include file="app/plug/view/mgift/footer"}
{include file="app/plug/view/mgift/share"}

  <script src="{__PUBLIC__}h5/more/dist/dropload.min.js"></script>
  
  <script>
  $(function(){
    // 页数
    var page = 0;
    // 每页展示5个
    var size = 5;
   
			
    // dropload
    $('.content').dropload({
        scrollArea : window,
        loadDownFn : function(me){
            page++;
            // 拼接HTML
            var result = '';
            $.ajax({
                type: 'GET',
                url: '{if $_GET['type']}{url($route='plug/mgift/strategy/id=<id>/type=<type>', $params=array('id'=>$_GET['id'],'type'=>$act))}?{else}{url($route='plug/mgift/strategy/id=<id>', $params=array('id'=>$_GET['id']))}{/if}t=json&page='+page,
				//url: 'http://ons.me/tools/dropload/json.php?page='+page+'&size='+size,
                dataType: 'json',
                success: function(data){
					
					 console.log(data);
                    var arrLen = data.length;
					
                    if(arrLen > 0){
	
                        for(var i=0; i<arrLen; i++){
                           result+='<li>'
                              +'<a href="'+data[i].url+'"><div  class="gongluelist-img"><img src="'+data[i].pic+'" /></div>'
                             +'<div class="gongluelist-title">'+data[i].title+'</div>'
                             +' <div class="gongluelist-icon"><span><i class="icon icon-106"></i> '+data[i].date+'</span><span><i class="icon icon-65">'                            +'</i> '+data[i].like+'</span></div></a>'
                            +'</li>';

                        }
						
				
						
						
                    // 如果没有数据
                    }else{
                        // 锁定
                        me.lock();
                        // 无数据
                        me.noData();
                    }
                    // 为了测试，延迟1秒加载
                    setTimeout(function(){
                        // 插入数据到页面，放到最后面
						//$(".weui_panel:after").css("border-top","1px solid #e5e5e5");
						$("#shoplistbox").css("background","#ffffff");
                        $('.lists').append(result);
                        // 每次数据插入，必须重置
                        me.resetload();
                    },1000);
                },
                error: function(xhr, type){
                   // alert('Ajax error!');
                    // 即使加载出错，也得重置
                    me.resetload();
                }
            });
        }
    });
});


$(".weui_navbar_item").click(function(){
	var data=$(this).attr("data");
	//window.location.href=url;
	if(data!='zh'){
	 $(".nav-menu-box").css("display","none");
	 $("."+data).css("display","block");	
		
	}
	
});

$(".nav-menu-box").click(function(){
	$(".nav-menu-box").css("display","none");
});


</script>
</body>
</html>
